using System;
using Volo.Abp.Domain.Entities.Auditing;

namespace BW.WMS.WareHouseManage
{
    /// <summary>
    /// 物料实体
    /// </summary>
    public class Material : FullAuditedAggregateRoot<Guid>
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string Code { get; set; }
        
        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// 物料规格
        /// </summary>
        public string Specification { get; set; }
        
        /// <summary>
        /// 物料单位
        /// </summary>
        public string Unit { get; set; }
        
        /// <summary>
        /// 物料类别 (可以是外键关联到物料类别表)
        /// </summary>
        public string Category { get; set; }
        
        /// <summary>
        /// 物料类型 (1-原材料，2-成品，3-半成品，4-备件)
        /// </summary>
        public int MaterialType { get; set; }
        
        /// <summary>
        /// 条形码
        /// </summary>
        public string Barcode { get; set; }
        
        /// <summary>
        /// 重量
        /// </summary>
        public decimal Weight { get; set; }
        
        /// <summary>
        /// 体积
        /// </summary>
        public decimal Volume { get; set; }
        
        /// <summary>
        /// 保质期(天)
        /// </summary>
        public int ShelfLife { get; set; }
        
        /// <summary>
        /// 最小库存
        /// </summary>
        public int MinStock { get; set; }
        
        /// <summary>
        /// 最大库存
        /// </summary>
        public int MaxStock { get; set; }
        
        /// <summary>
        /// 是否允许批次管理
        /// </summary>
        public bool HasBatchManagement { get; set; }
        
        /// <summary>
        /// 是否允许序列号管理
        /// </summary>
        public bool HasSerialNumberManagement { get; set; }
        
        /// <summary>
        /// 状态 (0-停用，1-启用)
        /// </summary>
        public int Status { get; set; }
        
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
        
        protected Material()
        {
        }
        
        public Material(
            Guid id,
            string code,
            string name,
            string unit,
            string specification = null,
            int materialType = 1,
            int status = 1) : base(id)
        {
            Code = code;
            Name = name;
            Unit = unit;
            Specification = specification;
            MaterialType = materialType;
            Status = status;
        }
    }
} 